package com.xiashitech.agent.proxy.hutool;

import com.xiashitech.agent.cache.classloader.ClassLoaderCache;
import com.xiashitech.agent.config.StartConfig;

import java.util.Collection;

public class CollUtil {
    private static String className = "cn.hutool.core.collection.CollUtil";

    public static boolean isEmpty(Collection<?> collection) {
        try{
            Class collUtilClass = ClassLoaderCache.getLaunchClassLoader().loadClass(className);
            return (boolean)collUtilClass.getMethod("isEmpty", Collection.class).invoke(null,collection);
        }catch (Exception e) {
            StartConfig.throwableStackPrinter(e);
        }
        return false;
    }
}
